package com.bocai.eelly.utils;

import android.os.CountDownTimer;
import android.widget.TextView;


public class TimeTick extends CountDownTimer {

    TextView tv;

    public TimeTick(long millisInFuture, long countDownInterval, TextView tv) {
        super(millisInFuture, countDownInterval);
        this.tv = tv;
    }

    @Override
    public void onTick(long millisUntilFinished) {
        tv.setText(millisUntilFinished / 1000+"s");
    }

    @Override
    public void onFinish() {
        tv.setText("已结束");
    }
}
